package com.xiaolun;

/**
 * @Author 硕鼠
 * @Date 2020/5/31 17:32
 * @Version 1.0
 * @Description 文件说明
 */
public class MyException extends Exception{

    //传递数字如果大于10,就抛出异常
    private int detail;

    public MyException(int a) {
        this.detail = a;
    }

    @Override //异常打印的信息
    public String toString() {
        return "MyException出现"+ detail;
    }
}
